package com.shaomengjie.smjmvp;

import android.app.Activity;
import android.app.Application;

import com.shaomengjie.smjmvp.framework.AppStateTracker;

import java.util.HashSet;

/**
 * Created by shaomengjie on 2017/4/7.
 * pdsshaomengjie@live.com
 */

public class MyApplication extends Application{
    public static MyApplication mContext;
    public HashSet<Activity> mainActivities;

    @Override
    public void onCreate() {
        AppStateTracker.init(this);
        AppStateTracker.getInstance().setAppState(AppStateTracker.APP_STATE_OFFLINE);
        mContext = (MyApplication) getApplicationContext();
        mainActivities = new HashSet<Activity>();
        super.onCreate();
    }

    public static MyApplication getContext() {
        return mContext;
    }

}
